{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Car Production Planning\n", "The Operations Department of DINOCO automobile manufacturing and assembly firm must establish the daily production quantities of two car models (SUV and Compact) which maximise profits according to the production capacity constraints. The firm also wishes to respect the environment, and in the future to benefit its sales, given its commitment to increase the FFM (Fleet Fuel Mileage) indicator; that is, the mileage efficiency per litre of fuel of produced fleet. \n", "\n", "To simplify this study case, a linear relation between the sale price and the quantity to be produced is assumed, given by the following function: $q_i = a_i-b_i·p_i$, where $a_i$ and $b_i$ are constants provided in the table below, and $p_i$ is the mean unit price per family of cars in K€. Parameter $C_i$ is also provided, which represents the cost per unit for the cars of family i. \n", "\n", "The only productive resource that restricts the system is the assembly line. It is estimated that the firm spends 1 h every day on assembling SUV and Compact cars. The time required ($R_i$) to produce one unit of each family of cars and the remaining former data are shown in the table. \n", "\n", "| i | Car model | a | b | C (K€) | R(seconds) | Kmpl |\n", "|---|-----------|-----|----|--------|------------|------|\n", "| 1 | SUV | 440 | 20 | 17 | 54 | 12 |\n", "| 2 | Compact | 248 | 12 | 13 | 56 | 20 |\n", "\n", "The FFM indicator, which must at least be 15 Kmpl, is calculated by\n", "using the harmonic mean: \n", "\n", "\n", "$FFM = \\Large \\frac{ q_1 + q_2}{\\Large \\frac{q_1}{kmpl_1} + \\Large \\frac{q_2}{kmpl_2}}$\n", "\n", "\n", "**a)** Formulate a non-linear programming model to help the Operations Department establish an optimum production plan which meets the existing constraints\n", "\n", "The decision variables are the quantities to produce ($q_{i}$)\n", "\n", "The objective of the production plan is to maximise profits:\n", "\n", "$\\max z = \\sum_i{q_i·(p_i-C_i)}$\n", "\n", "$= \\sum_i(q_i)·\\left(\\dfrac{a_i - q_i}{b_i} - C_i\\right)$\n", "\n", "$= q_1·\\left(\\dfrac{440 - q_1}{20} - 17\\right)+q_2·\\left(\\dfrac{248 - q_2}{12} - 13\\right)$\n", "\n", "$z = -0.05q_1^2 -0.083q_2^2+5q_1+7.6q_2$\n", "\n", "We have two constraints,\n", "\n", "The first constraint takes into account the bottleneck in the assembly line (seconds):\n", "\n", "$\\sum_i{R_i·q_i} \\leq 3600$\n", "\n", "$54·q_{1}+56·q_{2} \\leq 3600$\n", "\n", "$54·q_{1}+56·q_{2} - 3600 \\leq 0$\n", "\n", "The second constraint is on the FFM (kmpl): \n", "\n", "$FFM \\geq 15 \\rightarrow$\n", "\n", "$q_1 + q_2 \\geq 15·(\\frac{q_1}{kmpl_1}+\\frac{q_2}{kmpl_2}) \\rightarrow$\n", "\n", "$q_1·(1-\\frac{15}{kmpl_1}) + q_2·(1-\\frac{15}{kmpl_2}) \\geq 0 \\rightarrow$\n", "\n", "$-q_1·\\frac{3}{12}+q_2·\\frac{5}{20} \\geq 0 \\rightarrow$\n", "\n", "$q_1·\\frac{3}{12}-q_2·\\frac{5}{20} \\leq 0 \\rightarrow$\n", "\n", "$0.25·q_1-0.25·q_2 \\leq 0$\n", "\n", "We also have the non-negativity constraint:\n", "\n", "$q_{i} \\geq 0 \\forall i$\n", "\n", "**b)** Find the Kuhn-Tucker conditions\n", "\n", "First, we obtain the Lagrangian:\n", "\n", "$L = -0.05q_1^2 -0.083q_2^2+5q_1+7.7q_2 + \\lambda_1·\\left(54·q_{1}+56·q_{2} - 3600\\right) + \\lambda_2·\\left(0.25·q_1-0.25·q_2\\right)$\n", "\n", "**Gradient condition:**\n", "\n", "$\\nabla(L)=0$\n", "\n", "$\\dfrac{dL}{dq_1} = -0.1q_1+5+\\lambda_1·54+\\lambda_2·0.25 = 0$\n", "\n", "$\\dfrac{dL}{dq_2} = -0.166q_2+7.7+\\lambda_1·56-\\lambda_2·0.25 = 0$\n", "\n", "**Feasibility Condition:**\n", "\n", "$54·q_{1}+56·q_{2} - 3600 \\leq 0$\n", "\n", "$0.25·q_1-0.25·q_2 \\leq 0$\n", "\n", "**Orthogonality Condition:**\n", "\n", "$\\lambda_1·(54·q_{1}+56·q_{2} - 3600) = 0$\n", "\n", "$\\lambda_2·(0.25·q_1-0.25·q_2) = 0$\n", "\n", "**Non-negativity condition:**\n", "\n", "$\\lambda_1, \\lambda_2 \\leq 0$\n", "\n", "**c)** A solver provides the following solution: $q_1= 31.14$, $q_2 = 34.26$, $\\lambda_1 = -0.034$, $\\lambda_2 = 0$, where $\\lambda_1$ is the Lagrangian multiplier corresponding to the capacity constraint and $\\lambda_2$ is the Lagrangian multiplier of the FFM constraint. Interpret the results.\n", "\n", "The Hessian is: \n", "\n", "$H = \\begin{bmatrix}\n", "-0.1 & 0\\\\\n", "0 & -0.166\n", "\\end{bmatrix}$\n", "\n", "The Hessian determinants are:\n", "\n", "$H_1=-0.1$\n", "\n", "$H_2=0.0166$\n", "\n", "Which applying Sylvester's criterion, indicates that the Hessian is negative definite, confirming that the critical point is a local maximum." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 2 }